package com.smartscreen.contentmanage.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smartscreen.contentmanage.entity.Message;
import com.smartscreen.contentmanage.mapper.MessageMapper;
import com.smartscreen.contentmanage.service.MessageService;
import org.springframework.stereotype.Service;

@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {
    
    @Override
    public boolean approveMessage(String messageId, String status) {
        UpdateWrapper<Message> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("message_id", messageId)
                    .set("status", status);
        return this.update(updateWrapper);
    }
}